﻿<%@ Page Title="" Language="C#" MasterPageFile="~/_console/_console.Master" AutoEventWireup="true" CodeBehind="application-navigation-add.aspx.cs" Inherits="SmartSpace.WebApp._console.core.application_navigation_add" %>

<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolderHead" runat="server">
    <script>
        function sel(type, id) {
            if (type == 'view') {
                document.getElementById('set_view').style.display = '';
                document.getElementById('set_application').style.display = 'none';
                document.getElementById('set_other').style.display = 'none';
            } else if (type == 'application') {
                document.getElementById('set_view').style.display = 'none';
                document.getElementById('set_application').style.display = '';
                document.getElementById('set_other').style.display = 'none';
            } else if (type == 'other') {
                document.getElementById('set_view').style.display = 'none';
                document.getElementById('set_application').style.display = 'none';
                document.getElementById('set_other').style.display = '';
            }
        }

        function onselectPageCompleted(data) {
            $('#ctlPageCaption').val(data.caption);
            $('#_ctlSelPageId').val(data.id);
            $('#_ctlSelPageType').val(data.type);
            $('#_ctlSelPageUrl').val(data.url);
        }
    </script>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolderMenu" runat="server">
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="ContentPlaceHolderTitle" runat="server">
    创建导航
</asp:Content>
<asp:Content ID="Content4" ContentPlaceHolderID="ContentPlaceHolderToolbar" runat="server">
    <asp:HyperLink ID="_ctlLinkBack" runat="server">返回</asp:HyperLink>
    <asp:LinkButton ID="LinkButton1" runat="server" OnClick="_ctlBtnSave_Click">保存</asp:LinkButton>
</asp:Content>
<asp:Content ID="Content5" ContentPlaceHolderID="ContentPlaceHolderContent" runat="server">
    <div class="form">
        <label>
            父结点</label><br />
        <asp:TextBox ID="_ctlEditParent" runat="server" ReadOnly="true" Width="400px"></asp:TextBox>
        <asp:LinkButton ID="_ctlReset" runat="server" Text="清空" OnClick="_ctlReset_Click" /><br />
        <label>
            编号</label>
        <br />
        <asp:TextBox ID="_ctlEditCode" runat="server" Width="400px"></asp:TextBox><br />
        <label>
            名称</label>
        <br />
        <asp:TextBox ID="_ctlEditCaption" runat="server" Width="400px"></asp:TextBox><br />
        <label>
            描述</label>
        <br />
        <asp:TextBox ID="_ctlEditDescription" runat="server" Width="400px"></asp:TextBox><br />
        <label>
            GroupName</label>
        <br />
        <asp:TextBox ID="_ctlEditGroupName" runat="server" Width="400px"></asp:TextBox><br />
        <br />
        <div>
            <input id="radio_other" name="navigationtype" type="radio" checked="true" onclick="sel('other', 'set_other');" runat="server" clientidmode="Static" /><label for="radio_other">导航到页面</label>
            <input id="radio_view" name="navigationtype" type="radio" onclick="sel('view', 'set_view');" runat="server" clientidmode="Static" /><label for="radio_view">导航到视图(暂不使用)</label>
            <input id="radio_application" name="navigationtype" type="radio" onclick="sel('application', 'set_application');" runat="server" clientidmode="Static" /><label for="radio_application">导航到其他站点(暂不使用)</label>
        </div>
        <fieldset id="set_other">
            <legend>页面</legend>
            <label>
                页面名称</label>
            <br />
            <input id="ctlPageCaption" type="text" readonly="readonly" />
            <a href="javascript:void(0);" onclick="_ss.popup('../common/select-page.aspx', onselectPageCompleted);" title="点击选择页面">选择</a>
            <asp:HiddenField ID="_ctlSelPageId" ClientIDMode="Static" runat="server" />
            <asp:HiddenField ID="_ctlSelPageType" ClientIDMode="Static" runat="server" />
            <asp:HiddenField ID="_ctlSelPageUrl" ClientIDMode="Static" runat="server" />
        </fieldset>
        <fieldset id="set_view" style="display: none;">
            <legend>视图</legend>
            <label>
                Views</label>
            <br />
            <asp:TreeView ID="_ctlTreeView" runat="server" ShowCheckBoxes="All">
            </asp:TreeView>
        </fieldset>
        <fieldset id="set_application" style="display: none;">
            <legend>站点</legend>
            <label>
                applications</label>
            <br />
            <asp:ListBox ID="_ctlListApplication" runat="server" />
        </fieldset>
        <br />
        <label>
            Arguments</label>
        <br />
        <asp:TextBox ID="_ctlEditArguments" runat="server" Width="400px"></asp:TextBox>
        <br />
        <em>arg1=x&arg2=y&arg3=z</em><br /><br />
        <label>
            排序号:</label>
        <br />
        <asp:TextBox ID="_ctlEditSortIndex" runat="server" Width="400px"></asp:TextBox>
    </div>
</asp:Content>
